package service

import (
	"mall_book/common"
	"mall_book/dao"
	"mall_book/orm"
)

type UserService struct{}

func (svc *UserService) GetUserList() *common.Response {
	userDao := dao.NewUserDao(orm.DB)
	list, err := userDao.FindAll()
	if err != nil {
		return &common.Response{Code: common.GetUserListError}
	}
	return &common.Response{Data: &list}
}
